#ifndef TCP_CLIENT_H
#define TCP_CLIENT_H

#include "lwip/sockets.h"


#ifndef PARAM_SERVER_ADDR
#define PARAM_SERVER_ADDR "101.201.141.68" // your PC IP address
#endif

#ifndef PARAM_SERVER_PORT
#define PARAM_SERVER_PORT 7777
#endif

typedef struct 
{
    int sockfd;
    uint8_t last_server_connect_state;
    uint8_t server_connect_state;
    /* data */
} server_data_t;


int connect_to_tcp_server(const char* host_ip, unsigned short port);
void clear(int sockfd);

#endif
